try:
    age = int(input("请输入年龄："))
    if age >= 18:
        print("你已成年")
    else:
        print("你未成年")
except ValueError as error:
    print("输入不合法")
    print(error)

print("程序结束")

